(function scriptBlock()
{
    var number = 144;

    if (number === 0)
    {
        console.log("Zero");
    }
    else if (number === 1)
    {
        console.log("One");
    }
    else if (number === 2)
    {
        console.log("Two");
    }
    else if (number === 3)
    {
        console.log("Three");
    }
    else if (number === 4)
    {
        console.log("Four");
    }
    else if (number === 5)
    {
        console.log("Five");
    }
    else if (number === 6)
    {
        console.log("Six");
    }
    else if (number === 7)
    {
        console.log("Seven");
    }
    else if (number === 8)
    {
        console.log("Eight");
    }
    else if (number === 9)
    {
        console.log("Nine");
    }
    else if (number === 10)
    {
        console.log("Ten");
    }
    else if (number === 11)
    {
        console.log("Eleven");
    }
    else if (number === 12)
    {
        console.log("Twelve");
    }
    else if (number === 13)
    {
        console.log("Thirteen");
    }
    else if (number === 14)
    {
        console.log("Fourteen");
    }
    else if (number === 15)
    {
        console.log("Fifteen");
    }
    else if (number === 16)
    {
        console.log("Sixteen");
    }
    else if (number === 17)
    {
        console.log("Seventeen");
    }
    else if (number === 18)
    {
        console.log("Eighteen");
    }
    else if (number === 19)
    {
        console.log("Nineteen");
    }
    else if (number < 0 || number > 999)
    {
        console.log("Wrong number!");
    }
    else
    {
        switch ((number / 100) | 0)
        {
            case 1: console.log("One hundred"); break;
            case 2: console.log("Two hundred"); break;
            case 3: console.log("Three hundred"); break;
            case 4: console.log("Four hundred"); break;
            case 5: console.log("Five hundred"); break;
            case 6: console.log("Six hundred"); break;
            case 7: console.log("Seven hundred"); break;
            case 8: console.log("Eight hundred"); break;
            case 9: console.log("Nine hundred"); break;
            case 0: switch (number / 10)
            {
                case 2: console.log("Twenty"); break;
                case 3: console.log("Тhirty"); break;
                case 4: console.log("Fourty"); break;
                case 5: console.log("Fifty"); break;
                case 6: console.log("Sixty"); break;
                case 7: console.log("Seventy"); break;
                case 8: console.log("Eighty"); break;
                case 9: console.log("Ninety"); break;
            } break;
        }

        if ((((number / 100) | 0) !== 0) && ((((number / 10) | 0) % 10) !== 1) && ((number % 10) !== 0))
        {
            switch (((number / 10) | 0) % 10)
            {
                case 2: console.log(" twenty"); break;
                case 3: console.log(" thirty"); break;
                case 4: console.log(" fourty"); break;
                case 5: console.log(" fifty"); break;
                case 6: console.log(" sixty"); break;
                case 7: console.log(" seventy"); break;
                case 8: console.log(" eighty"); break;
                case 9: console.log(" ninety"); break;
            }
        }
        else if ((((number / 100) | 0) !== 0) && ((((number / 10) | 0) % 10) !== 1) && ((number % 10) === 0))
        {
            switch (((number / 10) | 0) % 10)
            {
                case 2: console.log(" and twenty"); break;
                case 3: console.log(" and thirty"); break;
                case 4: console.log(" and fourty"); break;
                case 5: console.log(" and fifty"); break;
                case 6: console.log(" and sixty"); break;
                case 7: console.log(" and seventy"); break;
                case 8: console.log(" and eighty"); break;
                case 9: console.log(" and ninety"); break;
            }
        }

        if ((((number / 10) | 0) % 10) === 1)
        {
            switch (number % 10)
            {
                case 1: console.log(" and eleven"); break;
                case 2: console.log(" and twelve"); break;
                case 3: console.log(" and thirteen"); break;
                case 4: console.log(" and fourteen"); break;
                case 5: console.log(" and fifteen"); break;
                case 6: console.log(" and sixteen"); break;
                case 7: console.log(" and seventeen"); break;
                case 8: console.log(" and eighteen"); break;
                case 9: console.log(" and nineteen"); break;
            }
        }
        else if ((((number / 100) | 0) !== 0) && ((((number / 10) | 0) % 10) === 0))
        {
            switch (number % 10)
            {
                case 1: console.log(" and one"); break;
                case 2: console.log(" and two"); break;
                case 3: console.log(" and three"); break;
                case 4: console.log(" and four"); break;
                case 5: console.log(" and five"); break;
                case 6: console.log(" and six"); break;
                case 7: console.log(" and seven"); break;
                case 8: console.log(" and eight"); break;
                case 9: console.log(" and nine"); break;
            }
        }
        else
        {
            switch (number % 10)
            {
                case 1: console.log(" one"); break;
                case 2: console.log(" two"); break;
                case 3: console.log(" three"); break;
                case 4: console.log(" four"); break;
                case 5: console.log(" five"); break;
                case 6: console.log(" six"); break;
                case 7: console.log(" seven"); break;
                case 8: console.log(" eight"); break;
                case 9: console.log(" nine"); break;
            }
        }
    }
})();